using System;
using System.Text.RegularExpressions;

namespace System72.NTextile.RegexLibrary
{
    public class ImageLinkRegex : BaseRegex
    {
        public ImageLinkRegex()
        {
            string pattern = String.Format(@"{0}([^\n\s]+)?(\((?>[^()]+|\((?<number>)|\)(?<-number>))*(?(number)(?!))\)){0}{1}", "!", @"[:]([^\s][-a-z0-9_:@&?=+,.!/~*'%$]+)");
            m_regex = new Regex(pattern);
        }
    }
}